home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / eiffel / smalleif.97 / se.t / SmallEiffel / lib_test / test_any.e < prev    next >
Encoding:
Text File  |  1996-05-02  |  743 b   |  45 lines

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class TEST_ANY
  5.  
  6. creation {ANY}
  7.    make
  8.    
  9. feature {ANY}
  10.    
  11.    a1: ANY;
  12.    
  13.    make is
  14.       local
  15.      a2: ANY;
  16.      c: like Current;
  17.       do
  18.      is_true(a1 = a2);
  19.      is_true(equal(a1,a2));
  20.      
  21.      a1 := Current;
  22.      is_true(not equal(a1,a2));
  23.      is_true(equal(a1,Current));
  24.      
  25.      c ?= a1;
  26.      is_true(is_equal(c));
  27.      
  28.       end;
  29.    
  30.    is_true(b: BOOLEAN) is
  31.       do
  32.      cpt := cpt + 1;
  33.      if not b then
  34.         std_output.put_string("TEST_ANY: ERROR Test # ");
  35.         std_output.put_integer(cpt);
  36.         std_output.put_string("%N");
  37.      else
  38.         -- std_output.put_string("Yes%N");
  39.      end;
  40.       end;
  41.    
  42.    cpt: INTEGER;
  43.    
  44. end -- TEST_ANY
  45.